<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
use App\Models\Package;


class SeedPackatesData extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        $data = [
            [
                'name'  =>  '基础型',
                'branch_num'  =>  '100',
            ],
            [
                'name'  =>  '爆款型',
                'branch_num'  =>  '300',
            ],
            [
                'name'  =>  '至尊型',
                'branch_num'  =>  '600',
            ],
        ];

        collect($data)->each(function($query){
            Package::create($query);
        });
        //
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        DB::table('packages')->truncate();
    }
}
